package com.woniuxy.rabbit.simple;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: 15489  <br/>
 * Date: 2022/4/6:14:46  <br/>
 * Description:
 */

@Component
public class Consumer {
//    接受生产者发送的消息
    @RabbitListener(queues = "simple_queue") //监听消息队列
    public  void  accept(String msg){
        System.out.println("约吗"+msg);
    }
}
